
package com.yn.xr.middleware.news.service;

import java.util.List;
import java.util.Map;

import com.yn.xr.common.page.PageResult;
import com.yn.xr.news.mode.NewsCommentRevert;

/**
 * @description:新闻评论回复接口
 * @fileName:CommentService.java
 * @createTime:2015年5月12日 下午3:51:44
 * @author:HX1401125
 * @version 1.0.0
 */
public interface CommentRevertService
{
	
	/**
	 * @function:分页查询新闻评论回复
	 * @param commentRevert
	 * @param pageNum
	 * @param pageSize
	 * @return PageResult<NewsCommentRevert>
	 * @exception
	 * @author:HX1401125
	 * @since 1.0.0
	 */
	public PageResult<NewsCommentRevert> queryCommentRevert(NewsCommentRevert commentRevert, int pageNum, int pageSize);
	
	/**
	 * @function:添加新闻评论回复
	 * @param commentRevert
	 * @return
	 * @throws Exception boolean
	 * @exception
	 * @author:HX1401125
	 * @since 1.0.0
	 */
	public boolean saveCommentRevert(NewsCommentRevert commentRevert) throws Exception;
	
	/**
	 * @function: 新闻评论回复修改
	 * @param commentRevert
	 * @return
	 * @throws Exception boolean
	 * @exception
	 * @author:HX1401125
	 * @since 1.0.0
	 */
	public boolean updateCommentRevert(NewsCommentRevert commentRevert)	throws Exception;
	
	/**
	 * @function: 新闻评论回复删除
	 * @param commentRevert
	 * @return
	 * @throws Exception boolean
	 * @exception
	 * @author:HX1401125
	 * @since 1.0.0
	 */
	public boolean deleteCommentRevert(NewsCommentRevert commentRevert) throws Exception;
	
	/**
	 * 根据新闻ID 删除 回复
	 * @param newsId
	 * @return
	 */
	public int deleteNewsCommentRevertBynewsId(Integer newsId);
	/**
	 * @function:根据新闻评论回复的ID删除
	 * @param id
	 * @return
	 * @throws Exception NewsCommentRevert
	 * @exception
	 * @author:HX1401125
	 * @since 1.0.0
	 */
	public NewsCommentRevert getCommentRevertById(Integer id) throws Exception;
	
	/**
	 * 获取同一新闻评论下的回复总数
	 * @param map
	 * @return
	 * @see [类、类#方法、类#成员]
	 * @param
	 */
	public Integer getCommentReverCount(Map<String, String> map);
	
	/**
	 * 获取回复信息集合
	 * @param commentId
	 * @param newsId
	 * @param status
	 * @return
	 * @see [类、类#方法、类#成员]
	 * @param
	 */
	public List<NewsCommentRevert> getNewsCommentRevert(Integer commentId, Integer newsId, Integer status);
	
	public int deleteNewsCommentRevertByCommentId(Integer commentId);
	
}
